<!--
 * @Description: 
 * @Autor: 商晓彬
 * @Date: 2021-08-20 09:56:50
 * @LastEditors: 商晓彬
 * @LastEditTime: 2021-12-10 16:42:08
-->
<div bsModal #createOrEditModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
    aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{backdrop: 'static', keyboard: !saving}">
    <div style="width:1880px!important;margin: 1.75rem auto;">
        <div class="modal-content">
            <form *ngIf="active" #drawForm="ngForm" novalidate autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>BOM查看</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')"
                        [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body" style="height: 740px!important;">
                    <div class="primeng-datatable-container" [busyIf]="primengTableHelper.isLoading">
                        <p-treeTable [lazy]="true" [value]="files1" [scrollable]="true" (onLazyLoad)="getTreedata()" scrollHeight="600px">
                            <ng-template pTemplate="header">
                                <tr>
                                    <th style="width: 200px">Bom层级</th>
                                    <th style="width: 150px">图号</th>
                                    <th style="width: 150px">物料名称</th>
                                    <th style="width: 150px">规格型号</th>
                                    <th style="width: 150px">单位</th>
                                    <th style="width: 150px">Bom用量</th>
                                    <th style="width: 150px">年代号</th>
                                    <th style="width: 150px">备注</th>
                                    <th style="width: 150px">物料属性</th>
                                    <th style="width: 150px">物料类别</th>
                                    <th style="width: 150px">细分类别</th>
                                </tr>
                            </ng-template>
                            <ng-template pTemplate="body" let-rowNode let-rowData="rowData">
                                <tr [ttRow]="rowNode"  *ngIf="rowData">
                                    <td style="width: 200px">
                                        <p-treeTableToggler [rowNode]="rowNode"></p-treeTableToggler>
                                        {{rowData.levelNum}}
                                    </td>
                                    <td style="width: 150px">{{rowData.materialNo}}</td>
                                    <td style="width: 150px">{{rowData.materialName}}</td>
                                    <td style="width: 150px">{{rowData.module}}</td>
                                    <td style="width: 150px">{{rowData.unit}}</td>
                                    <td style="width: 150px">{{rowData.unit1BomDosage}}</td>
                                    <td style="width: 150px">{{rowData.yearsNo}}</td>
                                    <td style="width: 150px">{{rowData.remark}} </td>
                                    <td style="width: 150px">{{rowData.materialProperty}}</td>
                                    <td style="width: 150px">{{rowData.materialsTypeName}}</td>
                                    <td style="width: 150px">{{rowData.materialCategoryName}}</td>
                                </tr>
                            </ng-template>
                        </p-treeTable>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>